//
//  HLViewController.m
//  YueYue
//
//  Created by hulu001 on 2023/5/17.
//

#import "HLViewController.h"

@interface HLViewController ()

@end

@implementation HLViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = UIColorWhite;
    self.kvoController = [FBKVOController controllerWithObserver:self];
    self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
}

- (void)viewWillDisappear:(BOOL)animated
{
    if ([self.request isCancelled]){
        [self.request stop];
    }
    
    [super viewWillDisappear:animated];
}

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleDarkContent;
}

- (void)requestFinished:(__kindof YTKBaseRequest *)request
{
    [self hideEmptyView];
}

- (void)requestFailed:(__kindof YTKBaseRequest *)request
{
    [self.emptyView setLoadingViewHidden:YES];
    [self.emptyView setImage:UIImageMake(@"empty_icon_2")];
    [self.emptyView setTextLabelText:request.error.localizedDescription];
}


#pragma mark - QMUINavigationControllerDelegate

- (BOOL)shouldCustomizeNavigationBarTransitionIfHideable {
    return YES;
}


@end
